<!doctype html>
<head>
	<meta http-equiv="Content-type" content="text/html; charset=utf-8">
	<title>Custom view</title>
</head>
	<script src="../../codebase/dhtmlxscheduler.js" type="text/javascript" charset="utf-8"></script>
	<link rel="stylesheet" href="../../codebase/dhtmlxscheduler.css" type="text/css" title="no title" charset="utf-8">

	
<style type="text/css" media="screen">
	html, body{
		margin:0px;
		padding:0px;
		height:100%;
		overflow:hidden;
	}	
</style>

<script type="text/javascript" charset="utf-8">
	function init() {
		
		scheduler.config.xml_date="%Y-%m-%d %H:%i";
		scheduler.xy.editor_width = 0; //disable editor's auto-size
		
		
		scheduler.locale.labels.workweek_tab = "W-Week"
		scheduler.locale.labels.decade_tab = "Decade"
		
		
		
		
		scheduler.attachEvent("onTemplatesReady",function(){
			//work week
			scheduler.date.workweek_start = scheduler.date.week_start;
			scheduler.templates.workweek_date = scheduler.templates.week_date;
			scheduler.templates.workweek_scale_date = scheduler.templates.week_scale_date;
			scheduler.date.add_workweek=function(date,inc){ return scheduler.date.add(date,inc*7,"day"); }
			scheduler.date.get_workweek_end=function(date){ return scheduler.date.add(date,5,"day"); }
			
			
			
			//decade
			scheduler.date.decade_start = function(date){
				var ndate = new Date(date.valueOf());
				ndate.setDate(Math.floor(date.getDate()/10)*10+1);
				return this.date_part(ndate);
			}
			scheduler.templates.decade_date = scheduler.templates.week_date;
			scheduler.templates.decade_scale_date = scheduler.templates.week_scale_date;
			scheduler.date.add_decade=function(date,inc){ return scheduler.date.add(date,inc*10,"day"); }
		});
		
		scheduler.init('scheduler_here',new Date(2010,0,10),"workweek");
		scheduler.load("./data/events.xml");
	
		
	}
</script>

<body onload="init();">
	<div id="scheduler_here" class="dhx_cal_container" style='width:100%; height:100%;'>
		<div class="dhx_cal_navline">
			<div class="dhx_cal_prev_button">&nbsp;</div>
			<div class="dhx_cal_next_button">&nbsp;</div>
			<div class="dhx_cal_today_button"></div>
			<div class="dhx_cal_date"></div>
			<div class="dhx_cal_tab" name="day_tab" style="right:204px;"></div>
			<div class="dhx_cal_tab" name="week_tab" style="right:140px;"></div>
			<div class="dhx_cal_tab" name="workweek_tab" style="right:280px;"></div>
			<div class="dhx_cal_tab" name="decade_tab" style="right:345px;"></div>
			<div class="dhx_cal_tab" name="month_tab" style="right:76px;"></div>
		</div>
		<div class="dhx_cal_header">
		</div>
		<div class="dhx_cal_data">
		</div>		
	</div>
</body>